<?php

class Db_Tables_BjmMembersPid extends Zend_Db_Table
{
    protected $_name = 'bjm_members_pid';
	
	function GetPid($member_id)
	{
		$result = array(
			1 => "", //QQ
			2 => ""  //WX
		);
		
		if($member_id)
		{
			$rows = $this->fetchAll("member_id = ".intval($member_id));
			
			if($rows)
			{
				foreach($rows as $row)
				{
					if(1 == $row['pid_type'])
					{
						$result[1] = $row['pid'];
					}elseif(2 == $row['pid_type'])
					{
						$result[2] = $row['pid'];
					}
				}
			}
		}
		
		return $result;
	}
}